package com.ztgf.order.models.service;

import com.baomidou.mybatisplus.service.IService;
import com.ztgf.order.models.bo.OrderPayBO;
import com.ztgf.order.models.bo.OrderPayRelationSaveBO;
import com.ztgf.order.models.dto.OrderPayRelationDTO;
import com.ztgf.order.models.vo.OrderInfoVO;

import java.util.List;

/**
 * 订单支付关联关系表服务
 *
 * @author YUE
 * @Date 2020-06-23 10:34:22
 */
public interface IOrderPayRelationService extends IService<OrderPayRelationDTO> {

    boolean addOrderPayRelationInfo(OrderPayBO orderPayBO);

    boolean add(OrderPayRelationSaveBO saveBO);

    void thawOrderLastMoney(Long orderId);

    OrderPayRelationDTO getByOrderIdAndPeriods(Long orderId, int periods);

    List<OrderPayRelationDTO> getByOrderId(Long orderId);

    boolean addByOrderInfo(OrderInfoVO orderInfoVO);

    /**
     * 判断是否全部支付完成
     * @param orderId 订单id
     * @param id 订单支付关系id
     * @return
     */
    boolean getOrderAllPaySuccess(Long orderId, Long id);
}
